home *** CD-ROM | disk | FTP | other *** search
/ 3D Games (Spidla) / 3dhry2.iso / Tank Wars 3D / src / INTRO.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  2003-03-17  |  1.1 KB  |  50 lines

  1. #include "tankwars.h"
  2.  
  3. extern HDC hDC;
  4. extern GLuint texture[TOTAL_TEXTURES];
  5. extern GLuint model[TOTAL_MODELS];
  6.  
  7. _2Df tankpos[2];
  8. int tankrot[2];
  9.  
  10. void renderintro(void);
  11.  
  12. void playintro(void)
  13. {
  14.     int i;
  15.  
  16.     gluPerspective(45.0f,(GLfloat)4/(GLfloat)3,1.0f,100.0f);
  17.     tankpos[0].x=0;
  18.     tankpos[0].y=-60;
  19.     for(i=0; i<500; i++)
  20.         renderintro();
  21.     gluPerspective(45.0f,(GLfloat)4/(GLfloat)3,260.0f,430.0f);
  22. }
  23.  
  24. void renderintro(void)
  25. {
  26.     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  27.     glLoadIdentity();
  28. //    glDisable(GL_TEXTURE_2D);
  29.  
  30.     glColor3f(1.0f, 0.8f, 0.2f);
  31.     glPrint(200, 350, 0, "T A N K   W A R S    3 D");
  32.     glLoadIdentity();
  33.  
  34.     glDisable(GL_BLEND);
  35.     glDisable(GL_DEPTH_TEST);
  36.     glTranslatef(0, 0, -10);
  37.     glColor3f(1.0f, 1.0f, 1.0f);
  38. //    glBindTexture(GL_TEXTURE_2D, texture[REDTANK_TEXTURE]);
  39.     glBegin(GL_QUADS);
  40.         glVertex3f(1.0f, 1.0f, 0.0f);
  41.         glVertex3f(-1.0f, 1.0f, 0.0f);
  42.         glVertex3f(-1.0f, -1.0f, 0.0f);
  43.         glVertex3f(1.0f, -1.0f, 0.0f);
  44.     glEnd();
  45.     glCallList(model[TANK_MODEL]);
  46.  
  47.     // Flush the data and swap the front and back buffers:
  48.     glFlush();
  49.     SwapBuffers(hDC);
  50. }